/**
 *
 * @properties={typeid:24,uuid:"84079134-3d67-44ba-8eb6-146e74270ecd"}
 */
function alta()
{
	databaseManager.setAutoSave(false)
	var p = arguments[0]
	                  
	controller.newRecord()
	origen = p[0]
	rubro = p[1]
	subrubro = p[2]
	cuenta = p[3]
	subcuenta = p[4]
	
}

/**
 *
 * @properties={typeid:24,uuid:"a4a680fc-adb5-4733-816e-64089871bcf8"}
 */
function cargarHijo()
{
	hijo (origen,rubro,subrubro,cuenta,subcuenta)
}

/**
 *
 * @properties={typeid:24,uuid:"ffdd61de-718a-46a4-a5a1-e837f8bd181f"}
 */
function cargarHno()
{
	hno (origen,rubro,subrubro,cuenta,subcuenta)
}

/**
 *
 * @properties={typeid:24,uuid:"e26e9fb6-e14b-493b-abb4-ed1b7041defd"}
 */
function hijo()
{
	var p = arguments
	var i = 0
	
	while ((i < 5 ) && (p[i] != 0))
		i++
	
	if (i == 5)
		p[4] = 0
	else
	{
		while (i < 5)
		{
			p[i] = 0
			i++
		}
	}
	forms.plan_de_cuentas_dtl.controller.show()
	alta (p)
	
}

/**
 *
 * @properties={typeid:24,uuid:"2bca5043-8e45-4336-add4-b60b98615c9f"}
 */
function hno()
{
	var p = arguments
	var i = 0
	
	while ((i < 5 ) && (p[i] != 0))
		i++
	
	if (i == 5)
		p[4] = 0
	else
	{
		i--
		while (i < 5)
		{
			p[i] = 0
			i++
		}
	}
	forms.plan_de_cuentas_dtl.controller.show()
	alta (p)

}
